package com.coffeeloversupportlibrary.coffeelover.mercury.my;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatButton;

import com.coffeeloversupportlibrary.R;
import com.coffeeloversupportlibrary.coffeelover.mercury.entity.User;

/**
 * @author 盛守义
 * @createTime 2021/11/3 17:06
 * @projectName TurningCoffee
 * @className UserMessageActivity.java
 * @description TODO
 */
public class UserMessageActivity extends Activity {
    private ImageView civ_userimg;
    private LinearLayout ll_exavatar;
    private EditText et_account, et_username, et_sign;
    private AppCompatButton btn_submit;

    private User user;
    private Intent intent;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_activity_mymessage);

        user = getIntent().getParcelableExtra("userInfo");

        initViews();
        setListener();
    }

    void setListener(){

    }

    class MyOnClickListener implements View.OnClickListener{

        @Override
        public void onClick(View view) {
            switch (view.getId()){
                case R.id.civ_avatarmymsg:
                    intent = new Intent(UserMessageActivity.this, AvatarActivity.class);
                    intent.putExtra("userInfo", user);
                    startActivity(intent);
                    break;
                case R.id.btn_submitmsg:

                    break;
            }
        }
    }

    void initViews(){
        civ_userimg = findViewById(R.id.civ_avatarmymsg);
        ll_exavatar = findViewById(R.id.ll_exavatarmsg);
        et_account = findViewById(R.id.et_accountmsg);
        et_sign = findViewById(R.id.et_signaturemsg);
        et_username = findViewById(R.id.et_usernameset);
        btn_submit = findViewById(R.id.btn_submitmsg);
    }
}
